<?php
/**
 * Created by PhpStorm.
 * User: zhangjian37
 * Date: 2016/9/16
 * Time: 22:08
 */

$RootDir = $_SERVER['DOCUMENT_ROOT'];
include $RootDir . '/utils/mysql/MysqlUtils.php';
include $RootDir . '/utils/CommonConstant.php';

//通过user_name得到手机，邮箱，密保
$user_name = $_POST['user_name'];
$password = $_POST['password'];

$conn = conn_mysql();
//判断验证码是否正确
$query = "update user_info set pwd = '$password' where uname = '$user_name'";
if (!mysql_query($query,$conn)) {
    die('err: ' . mysql_error());
}

echo 'OK';